﻿<Window x:Class="WPFHelper.Dialog2.DialogWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:base="clr-namespace:WPFHelper.Dialog2"
        Title="DialogWindow" Height="300" Width="300"
        SizeToContent="WidthAndHeight"
        ShowInTaskbar="False"
        WindowStyle="SingleBorderWindow" 
        WindowStartupLocation="CenterOwner" Topmost="True" ResizeMode="NoResize"
        >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <base:WPFDialogControl Grid.Row="0"
                               x:Name="BaseControl"
                               Content="{Binding .}"/>
        <!--<ContentPresenter Grid.Row="0"
                          x:Name="DialogPresenter" 
                          Content="{Binding .}"/>-->
        <StackPanel Grid.Row="2" 
                    Orientation="Horizontal" 
                    HorizontalAlignment="Right">
            <Button Name="okButton" Click="okButton_Click" 
                    IsDefault="True" Margin="4" Width="50"
                    IsEnabled="{Binding ElementName=BaseControl, Path=Validated}">OK</Button>
            <Button Name="cancelButton" IsCancel="True" Margin="4" Width="50" Click="cancelButton_Click">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>
